package com.lzy.mall.product.service.impl;

import com.lzy.mall.product.entity.PmsSpuInfoDesc;
import com.lzy.mall.product.dao.PmsSpuInfoDescDao;
import com.lzy.mall.product.service.PmsSpuInfoDescService;
import org.springframework.stereotype.Service;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * spu信息介绍(PmsSpuInfoDesc)表服务实现类
 *
 * @author lzy
 * @since 2021-08-25 11:41:28
 */
@Service
@RequiredArgsConstructor(onConstructor_ = {@Autowired})
public class PmsSpuInfoDescServiceImpl implements PmsSpuInfoDescService {
    private final PmsSpuInfoDescDao infoDescDao;

    @Override
    public void save(PmsSpuInfoDesc spuInfoDesc) {
        infoDescDao.insertTemplate(spuInfoDesc);
    }

    @Override
    public PmsSpuInfoDesc getById(Long spuId) {
        return infoDescDao.single(spuId);
    }
}
